//
//  RootViewController.m
//  开心一刻
//
//  Created by lanou on 16/4/6.
//  Copyright © 2016年 刘洋. All rights reserved.
//

#import "RootViewController.h"
#import "TabBarViewController.h"
@interface RootViewController ()

@end

@implementation RootViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    UIImageView * myImage = [[UIImageView alloc]initWithFrame:[UIScreen mainScreen].bounds];
    myImage.userInteractionEnabled = YES;
    myImage.image = [UIImage imageNamed:@"521.jpg"];
    [self.view addSubview:myImage];
    TabBarViewController * tabar = [[TabBarViewController alloc]init];
 
    UILabel * lable = [[UILabel alloc]initWithFrame:CGRectMake(5, 100, KedWidth -10, 60)];
    lable.backgroundColor = [UIColor clearColor];
    lable.text = @"人 生 如 浩 瀚 星 空 神 秘 而 且  美 丽 ";
    lable.textColor = [UIColor whiteColor];
    lable.alpha = 0;
    lable.numberOfLines = 0;
    lable.font = [UIFont systemFontOfSize:18];
    [myImage addSubview:lable];
    
    
    UILabel * lable1 = [[UILabel alloc]initWithFrame:CGRectMake(5, 200, KedWidth -10, 60)];
    lable1.backgroundColor = [UIColor clearColor];
    lable1.text = @"生 活 因 为 简 单 多 姿 多 彩  ";
    lable1.alpha = 0;
    lable1.textColor = [UIColor whiteColor];
    lable1.numberOfLines = 0;
    lable1.font = [UIFont systemFontOfSize:18];
    [myImage addSubview:lable1];

     UILabel * lable2 = [[UILabel alloc]initWithFrame:CGRectMake(5, 300, KedWidth -10, 60)];
      lable1.backgroundColor = [UIColor clearColor];
    lable2.text = @"欢 迎 来 到 开 心 一 刻,感 谢 一 路 有 你 ";
    
    lable2.alpha = 0;
    lable2.numberOfLines = 0;
    lable2.textColor = [UIColor whiteColor];
    lable2.font = [UIFont systemFontOfSize:18];
    [myImage addSubview:lable2];

    UILabel * lable3 = [[UILabel alloc]initWithFrame:CGRectMake(5, 400, KedWidth -10, 60)];
    lable3.backgroundColor = [UIColor clearColor];
    lable3.text = @"请 大 胆 去 追 求 属 于 自 己 的 爱 ";
    
    lable3.alpha = 0;
    lable3.numberOfLines = 0;
    lable3.textColor = [UIColor whiteColor];
    lable3.font = [UIFont systemFontOfSize:18];
    [myImage addSubview:lable3];
    
     [UIView animateWithDuration:0.8 animations:^{
          lable.alpha = 1;
     } completion:^(BOOL finished) {
         
         
        [UIView animateWithDuration:0.8 animations:^{
            lable1.alpha = 1;
        } completion:^(BOOL finished) {
           
    
            [UIView animateWithDuration:0.8 animations:^{
                lable2.alpha = 1;
            } completion:^(BOOL finished) {
               
               [UIView animateWithDuration:2 animations:^{
                   lable3.alpha = 1;
               } completion:^(BOOL finished) {
                   [self presentViewController:tabar animated:YES completion:nil];
               }];
                
                
            }];
            
        }];
         
         
     }];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
